package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 销售车实体类
 */
@TableName("t_saleCar")
public class SaleCarBean {
    //编号
    @TableId(value = "pk_saleCarId",type = IdType.AUTO)
    private Integer id;
    //销售的商品
    @TableField(exist = false)
    private GoodsBean goodsBean;
    //商品编号
    @TableField("fk_goodsId")
    private Integer goodsId;
    //销售数量
    @TableField("s_num")
    private Integer num = 1;
   // 销售用户编号
    @TableField("fk_userId")
    private Integer userId;

    public SaleCarBean() {
    }

    public SaleCarBean(Integer goodsId,  Integer userId) {
        this.goodsId = goodsId;
        this.userId = userId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public GoodsBean getGoodsBean() {
        return goodsBean;
    }

    public void setGoodsBean(GoodsBean goodsBean) {
        this.goodsBean = goodsBean;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "SaleCarBean{" +
                "id=" + id +
                ", goodsBean=" + goodsBean +
                ", goodsId=" + goodsId +
                ", num=" + num +
                ", userId=" + userId +
                "}\n";
    }
}
